require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 2,["5"] = 2,["6"] = 2,["8"] = 2,["9"] = 9,["10"] = 10,["12"] = 11,["13"] = 11,["14"] = 12,["15"] = 13,["16"] = 14,["18"] = 11,["21"] = 17,["22"] = 9,["23"] = 23,["24"] = 24,["26"] = 25,["27"] = 25,["28"] = 26,["29"] = 27,["30"] = 28,["32"] = 25,["35"] = 31,["36"] = 23,["37"] = 35,["39"] = 36,["40"] = 36,["41"] = 37,["42"] = 38,["43"] = 39,["45"] = 36,["48"] = 35,["49"] = 48,["51"] = 49,["52"] = 49,["53"] = 50,["54"] = 51,["55"] = 52,["57"] = 49,["60"] = 48,["61"] = 2});
local ____exports = {}
____exports.default = __TS__Class()
local ForceUtil = ____exports.default
ForceUtil.name = "ForceUtil"
function ForceUtil.prototype.____constructor(self)
end
function ForceUtil.getUserCount()
    local count = 0
    do
        local i = 0
        while i < bj_MAX_PLAYER_SLOTS do
            local tempPlayer = Player(i)
            if GetPlayerController(tempPlayer) == MAP_CONTROL_USER and GetPlayerSlotState(tempPlayer) == PLAYER_SLOT_STATE_PLAYING then
                count = count + 1
            end
            i = i + 1
        end
    end
    return count
end
function ForceUtil.getUserForce()
    local force = CreateForce()
    do
        local i = 0
        while i < bj_MAX_PLAYER_SLOTS do
            local tempPlayer = Player(i)
            if GetPlayerController(tempPlayer) == MAP_CONTROL_USER and GetPlayerSlotState(tempPlayer) == PLAYER_SLOT_STATE_PLAYING then
                ForceAddPlayer(force, tempPlayer)
            end
            i = i + 1
        end
    end
    return force
end
function ForceUtil.forUserForce(callback)
    do
        local i = 0
        while i < bj_MAX_PLAYER_SLOTS do
            local tempPlayer = Player(i)
            if GetPlayerController(tempPlayer) == MAP_CONTROL_USER and GetPlayerSlotState(tempPlayer) == PLAYER_SLOT_STATE_PLAYING then
                callback(nil, tempPlayer)
            end
            i = i + 1
        end
    end
end
function ForceUtil.forPlayerAllyForce(player, callback)
    do
        local i = 0
        while i < bj_MAX_PLAYER_SLOTS do
            local tempPlayer = Player(i)
            if GetPlayerSlotState(tempPlayer) == PLAYER_SLOT_STATE_PLAYING and IsPlayerAlly(tempPlayer, player) then
                callback(nil, tempPlayer)
            end
            i = i + 1
        end
    end
end
____exports.default = ForceUtil
return ____exports
